// 连接数据库
var mysql = require('mysql');

var connection = mysql.createConnection({
    host: 'localhost',
    post: 3306,
    user: 'root',
    password: '123456',
    database: 'stu'
});

try {
    connection.connect();
} catch (err) {
    console.log('显示数据异常' + err);
}

module.exports = connection;